<?php

namespace app\site\model;

use think\Model;


/**
 * 站点配置模型
 */
class SiteConfig extends Model
{

    // 表主键
    protected $pk = 'id';

    // 表名
    protected $name = 'config';


    protected $append = [
        'var_name'
    ];





    public function getContentAttr($value, $data)
    {
        return json_decode($value, true);
    }


    public function getVarNameAttr($value, $data)
    {
        return $data['group'] . '.' . $data['name'];
    }




}